/**
 * 本地存储相关代码
 */
export default {
    save(key = '', value = '') {
        localStorage.setItem(key, JSON.stringify(value))
    },
    fetch(key = null) {
        return JSON.parse(localStorage.getItem(key) || null) || ''
    },
    clear() {
        localStorage.clear()
    },
    keys() {
        return localStorage.keys()
    },
    removeItem(key = '') {
        return localStorage.removeItem(key)
    }
}
